function | User Management
$hidden _hash_var= ' Your_password_here ';
$LOGGED _in=false;
Clear it out in case someone sets it in the URL or something
unset ($LOGGED _in);
/*
CREATE TABLE User (
user_id int NOT NULL Auto_increment primary
Today I'll talk about how to get rid of these security issues in the framework.
The first is SQL injection, and if you're using PDO, I think there's no problem, if you're using APIs like mysql_*, you can implement bindparameter in a framework or
Random load CSS style JS effect is actually very good implementation, the code of this article is as follows, the specific idea is to use a default CSS style: Default.css. Another css:skin1.css,skin2.css,skin3.css with three other names. Of course
ajax| Navigation | yahoo
After many improvements, can be used directly on the general Web site, now release the source program download (encoding for Utf-8, to gb3212 method is: With Notepad open, save when the corresponding encoding), hope for
Part of the cookie tells about the technical background of the cookie, which explains how to set up, use, delete cookies, and some of the limitations of cookies in PHP. PHP support for cookies is transparent and easy to use.
1, set cookie
PHP
In the daily operation process, it is unavoidable to use JavaScript in the user's browser to store some data locally, to achieve some can not use the server to identify functions, such as the identification of the user's second visit. Commonly used
Problem | Optimization 1, in a function, when passing an array
Using return is more efficient than using global
Like what
function Userloginfo ($usertemp) {
$detail =explode ("|", $usertemp);
return $detail;
}
$login =userloginfo ($USERDB);
Than
cookie| Shopping cart cookies function with shopping cart
ZiF posted on 2000-01-11 16:13:00
Wandering on the internet, found a good dongdong, the idea is good!
Can be used in small online stores.
I listed below the source code, we make good use of!
ob, output buffer, is the abbreviation for output buffering, not output cache. OB with the right, is able to have some help on speed, but blindly add the OB function, will only increase the extra burden of the CPU The basic principle of OB: If the
In the previous article , I mentioned that we should create multiple styles for my microblog and then randomly load the style on each visit to keep Weibo fresh. Although the idea and implementation are relatively simple, but still want to record
In many cases, we need to track the activities of our viewers throughout the site, automatic or semi-automatic identification of their identities (that is, the usual web site landing functions), at this time, we often use a set of variables to
cookie|javascript| objects
1. Create a Cookie Object
Because it is used as a class name or namespace, it is similar to the Math object, where a cookie is used to represent the objectvar Cookie = new Object ();2, to implement the method of setting
Use cookies.
A cookie is a browser that stores a small number of named data.
It is associated with a particular Web page or Web site.
Cookies are used to provide memory to the browser,
So that scripts and server programs can use the input data
In the development, we encountered the Cross-domain main or tangled in IE, the page of the IFRAME or frame or JS cross-domain, IE has security policy restrictions page without cookies, but if we add P3P, there is no limit to this strategy. This is
The error message appears:
Warning:cannot Modify header Information-headers already sent by
Solution:
Open Php_ini, search for output_bufferfing, remove the preceding semicolon, modify off to on, or set a numeric value. It's OK.
This type of
When you do a project, you need to prepare a unified error prompt function. Small series in function execution, first deal with the wrong address to write cookies to facilitate the user login can jump directly to the implementation of this page, but
Setcookie () defines a cookie that is sent along with the rest of the HTTP headers. As with other headers, cookies must be sent before any other output of the script (this is the protocol limit). This requires that the call to this function be
function one, output information control function
These functions allow you to control the content of your script output. It can be used in many different situations, especially if your script has already output information and needs to send a
JavaScript is a script that runs on the client, so it is generally not possible to set a session because the session is run on the server side.
Cookies are run on the client, so you can use JS to set cookies.
Suppose there is a case in which, in a
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.